
import React from "react";
import { View } from "@tarojs/components";
import { isAndriod } from "@utils";
import { StatusBarStyle } from "react-native";

let StatusBar: any;
if (IS_RN && isAndriod()) {
  StatusBar = require("react-native").StatusBar;
}

type Props = Partial<{
  barStyle:StatusBarStyle,
  backgroundColor:string,
  translucent:boolean
}>

export default function TaroStatusBar(props: Props) {
  return StatusBar ? (
    <StatusBar {...props} />
  ) : (
    <View style={{ display: "none" }} />
  );
}


